home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 42 / Amiga Format AFCD42 (Issue 126, Aug 1999).iso / -serious- / programming / other / jikes / src / stream.cpp < prev    next >
C/C++ Source or Header  |  1999-05-14  |  29KB  |  822 lines

  1. // $Id: stream.cpp,v 1.5 1999/03/09 14:37:17 shields Exp $
  2. //
  3. // This software is subject to the terms of the IBM Jikes Compiler
  4. // License Agreement available at the following URL:
  5. // http://www.ibm.com/research/jikes.
  6. // Copyright (C) 1996, 1998, International Business Machines Corporation
  7. // and others.  All Rights Reserved.
  8. // You must accept the terms of that agreement to use this software.
  9. //
  10. #include "config.h"
  11. #include <ctype.h>
  12. #include "stream.h"
  13. #include "code.h"
  14. #include "zip.h"
  15. #include "symbol.h"
  16. #include "control.h"
  17. #include "semantic.h"
  18.  
  19. wchar_t *LexStream::KeywordName(int kind)
  20. {
  21.     switch(kind)
  22.     {
  23.         case TK_abstract:     return StringConstant::US_abstract; break;
  24.         case TK_boolean:      return StringConstant::US_boolean;  break;
  25.         case TK_break:        return StringConstant::US_break;    break;
  26.         case TK_byte:         return StringConstant::US_byte;     break;
  27.         case TK_case:         return StringConstant::US_case; break;
  28.         case TK_catch:        return StringConstant::US_catch; break;
  29.         case TK_char:         return StringConstant::US_char; break;
  30.         case TK_class:        return StringConstant::US_class; break;
  31.         case TK_const:        return StringConstant::US_const; break;
  32.         case TK_continue:     return StringConstant::US_continue; break;
  33.         case TK_default:      return StringConstant::US_default; break;
  34.         case TK_do:           return StringConstant::US_do; break;
  35.         case TK_double:       return StringConstant::US_double; break;
  36.         case TK_else:         return StringConstant::US_else; break;
  37.         case TK_extends:      return StringConstant::US_extends; break;
  38.         case TK_false:        return StringConstant::US_false; break;
  39.         case TK_final:        return StringConstant::US_final; break;
  40.         case TK_finally:      return StringConstant::US_finally; break;
  41.         case TK_float:        return StringConstant::US_float; break;
  42.         case TK_for:          return StringConstant::US_for; break;
  43.         case TK_goto:         return StringConstant::US_goto; break;
  44.         case TK_if:           return StringConstant::US_if; break;
  45.         case TK_implements:   return StringConstant::US_implements; break;
  46.         case TK_import:       return StringConstant::US_import; break;
  47.         case TK_instanceof:   return StringConstant::US_instanceof; break;
  48.         case TK_int:          return StringConstant::US_int; break;
  49.         case TK_interface:    return StringConstant::US_interface; break;
  50.         case TK_long:         return StringConstant::US_long; break;
  51.         case TK_native:       return StringConstant::US_native; break;
  52.         case TK_new:          return StringConstant::US_new; break;
  53.         case TK_null:         return StringConstant::US_null; break;
  54.         case TK_package:      return StringConstant::US_package; break;
  55.         case TK_private:      return StringConstant::US_private; break;
  56.         case TK_protected:    return StringConstant::US_protected; break;
  57.         case TK_public:       return StringConstant::US_public; break;
  58.         case TK_return:       return StringConstant::US_return; break;
  59.         case TK_short:        return StringConstant::US_short; break;
  60.         case TK_static:       return StringConstant::US_static; break;
  61.         case TK_strictfp:     return StringConstant::US_strictfp; break;
  62.         case TK_super:        return StringConstant::US_super; break;
  63.         case TK_switch:       return StringConstant::US_switch; break;
  64.         case TK_synchronized: return StringConstant::US_synchronized; break;
  65.         case TK_this:         return StringConstant::US_this; break;
  66.         case TK_throw:        return StringConstant::US_throw; break;
  67.         case TK_throws:       return StringConstant::US_throws; break;
  68.         case TK_transient:    return StringConstant::US_transient; break;
  69.         case TK_true:         return StringConstant::US_true; break;
  70.         case TK_try:          return StringConstant::US_try; break;
  71.         case TK_void:         return StringConstant::US_void; break;
  72.         case TK_volatile:     return StringConstant::US_volatile; break;
  73.         case TK_while:        return StringConstant::US_while; break;
  74.  
  75.         case TK_PLUS_PLUS:                  return StringConstant::US_PLUS_PLUS; break;
  76.         case TK_MINUS_MINUS:                return StringConstant::US_MINUS_MINUS; break;
  77.         case TK_EQUAL_EQUAL:                return StringConstant::US_EQUAL_EQUAL; break;
  78.         case TK_LESS_EQUAL:                 return StringConstant::US_LESS_EQUAL; break;
  79.         case TK_GREATER_EQUAL:              return StringConstant::US_GREATER_EQUAL; break;
  80.         case TK_NOT_EQUAL:                  return StringConstant::US_NOT_EQUAL; break;
  81.         case TK_LEFT_SHIFT:                 return StringConstant::US_LEFT_SHIFT; break;
  82.         case TK_RIGHT_SHIFT:                return StringConstant::US_RIGHT_SHIFT; break;
  83.         case TK_UNSIGNED_RIGHT_SHIFT:       return StringConstant::US_UNSIGNED_RIGHT_SHIFT; break;
  84.         case TK_PLUS_EQUAL:                 return StringConstant::US_PLUS_EQUAL; break;
  85.         case TK_MINUS_EQUAL:                return StringConstant::US_MINUS_EQUAL; break;
  86.         case TK_MULTIPLY_EQUAL:             return StringConstant::US_MULTIPLY_EQUAL; break;
  87.         case TK_DIVIDE_EQUAL:               return StringConstant::US_DIVIDE_EQUAL; break;
  88.         case TK_AND_EQUAL:                  return StringConstant::US_AND_EQUAL; break;
  89.         case TK_OR_EQUAL:                   return StringConstant::US_OR_EQUAL; break;
  90.         case TK_XOR_EQUAL:                  return StringConstant::US_XOR_EQUAL; break;
  91.         case TK_REMAINDER_EQUAL:            return StringConstant::US_REMAINDER_EQUAL; break;
  92.         case TK_LEFT_SHIFT_EQUAL:           return StringConstant::US_LEFT_SHIFT_EQUAL; break;
  93.         case TK_RIGHT_SHIFT_EQUAL:          return StringConstant::US_RIGHT_SHIFT_EQUAL; break;
  94.         case TK_UNSIGNED_RIGHT_SHIFT_EQUAL: return StringConstant::US_UNSIGNED_RIGHT_SHIFT_EQUAL; break;
  95.         case TK_OR_OR:                      return StringConstant::US_OR_OR; break;
  96.         case TK_AND_AND:                    return StringConstant::US_AND_AND; break;
  97.  
  98.         case TK_PLUS:                       return StringConstant::US_PLUS; break;
  99.         case TK_MINUS:                      return StringConstant::US_MINUS; break;
  100.         case TK_NOT:                        return StringConstant::US_NOT; break;
  101.         case TK_REMAINDER:                  return StringConstant::US_REMAINDER; break;
  102.         case TK_XOR:                        return StringConstant::US_XOR; break;
  103.         case TK_AND:                        return StringConstant::US_AND; break;
  104.         case TK_MULTIPLY:                   return StringConstant::US_MULTIPLY; break;
  105.         case TK_OR:                         return StringConstant::US_OR; break;
  106.         case TK_TWIDDLE:                    return StringConstant::US_TWIDDLE; break;
  107.         case TK_DIVIDE:                     return StringConstant::US_DIVIDE; break;
  108.         case TK_GREATER:                    return StringConstant::US_GREATER; break;
  109.         case TK_LESS:                       return StringConstant::US_LESS; break;
  110.         case TK_LPAREN:                     return StringConstant::US_LPAREN; break;
  111.         case TK_RPAREN:                     return StringConstant::US_RPAREN; break;
  112.         case TK_LBRACE:                     return StringConstant::US_LBRACE; break;
  113.         case TK_RBRACE:                     return StringConstant::US_RBRACE; break;
  114.         case TK_LBRACKET:                   return StringConstant::US_LBRACKET; break;
  115.         case TK_RBRACKET:                   return StringConstant::US_RBRACKET; break;
  116.         case TK_SEMICOLON:                  return StringConstant::US_SEMICOLON; break;
  117.         case TK_QUESTION:                   return StringConstant::US_QUESTION; break;
  118.         case TK_COLON:                      return StringConstant::US_COLON; break;
  119.         case TK_COMMA:                      return StringConstant::US_COMMA; break;
  120.         case TK_DOT:                        return StringConstant::US_DOT; break;